raise an exception if the scope is not a symbol or string