Disallow assignments to structs and mappings

Is this dynamic cast necessary? I would prefer : return getScope() == nullptr ? false : true;