check navigator not defined