Check for namespaces in a more consistently reliable way.