Adding various checks on node type though the API Specifially checking against namespace nodes before accessing node pointers