A lightweight JavaScript helper checking for or creating namespace objects.