Index: src/AST/Node.cpp
===================================================================
--- src/AST/Node.cpp	(revision 5c9b20cdbd8f11c2e3b1817c4e65a16c5f1e9a65)
+++ src/AST/Node.cpp	(revision 52a4d6952a72c27bfea447beca6d9cc5c089dddd)
@@ -9,7 +9,7 @@
 // Author           : Thierry Delisle
 // Created On       : Thu May 16 14:16:00 2019
-// Last Modified By :
-// Last Modified On :
-// Update Count     :
+// Last Modified By : Andrew Beach
+// Last Modified On : Fri Jun  5 10:21:00 2020
+// Update Count     : 1
 //
 
@@ -43,4 +43,22 @@
 }
 
+[[noreturn]] static inline void strict_fail(const ast::Node * node) {
+	assertf(node, "strict_as had nullptr input.");
+	const ast::ParseNode * parse = dynamic_cast<const ast::ParseNode *>( node );
+	if ( nullptr == parse ) {
+		assertf(nullptr, "%s (no location)", toString(node).c_str());
+	} else if ( parse->location.isUnset() ) {
+		assertf(nullptr, "%s (unset location)", toString(node).c_str());
+	} else {
+		assertf(nullptr, "%s (at %s:%d)", toString(node).c_str(),
+			parse->location.filename.c_str(), parse->location.first_line);
+	}
+}
+
+template< typename node_t, enum ast::Node::ref_type ref_t >
+void ast::ptr_base<node_t, ref_t>::_strict_fail() const {
+	strict_fail(node);
+}
+
 template< typename node_t, enum ast::Node::ref_type ref_t >
 void ast::ptr_base<node_t, ref_t>::_inc( const node_t * node ) {
@@ -52,9 +70,9 @@
 void ast::ptr_base<node_t, ref_t>::_dec( const node_t * node, bool do_delete ) {
 	_trap( node );
-	node->decrement(ref_t, do_delete );
-}
-
-template< typename node_t, enum ast::Node::ref_type ref_t >
-void ast::ptr_base<node_t, ref_t>::_check() const { 
+	node->decrement( ref_t, do_delete );
+}
+
+template< typename node_t, enum ast::Node::ref_type ref_t >
+void ast::ptr_base<node_t, ref_t>::_check() const {
 	// if(node) assert(node->was_ever_strong == false || node->strong_count > 0);
 }
Index: src/AST/Node.hpp
===================================================================
--- src/AST/Node.hpp	(revision 5c9b20cdbd8f11c2e3b1817c4e65a16c5f1e9a65)
+++ src/AST/Node.hpp	(revision 52a4d6952a72c27bfea447beca6d9cc5c089dddd)
@@ -10,6 +10,6 @@
 // Created On       : Wed May 8 10:27:04 2019
 // Last Modified By : Andrew Beach
-// Last Modified On : Mon Jun  3 13:26:00 2019
-// Update Count     : 5
+// Last Modified On : Fri Jun 5 9:47:00 2020
+// Update Count     : 6
 //
 
@@ -243,7 +243,14 @@
 	const o_node_t * as() const { _check(); return dynamic_cast<const o_node_t *>(node); }
 
-	/// wrapper for convenient access to strict_dynamic_cast
+	/// Wrapper that makes sure dynamic_cast returns non-null.
 	template<typename o_node_t>
-	const o_node_t * strict_as() const { _check(); return strict_dynamic_cast<const o_node_t *>(node); }
+	const o_node_t * strict_as() const {
+		if (const o_node_t * ret = as<o_node_t>()) return ret;
+		_strict_fail();
+	}
+
+	/// Wrapper that makes sure dynamic_cast does not fail.
+	template<typename o_node_t, decltype(nullptr) null>
+	const o_node_t * strict_as() const { return node ? strict_as<o_node_t>() : nullptr; }
 
 	/// Returns a mutable version of the pointer in this node.
@@ -266,4 +273,5 @@
 	void _dec( const node_t * other, bool do_delete = true );
 	void _check() const;
+	void _strict_fail() const __attribute__((noreturn));
 
 	const node_t * node;
