hasScope(null) always returns true