I don't think it's possible to set an expression return type as an object. The only supported return type for "any" is ef_return_any and that only supports int, float and string (according to the documentation.
However, you can maybe have the expression return an object UID and then use the "Pick by UID" event to return the correct object.
As for checking the object type. In the expression, you can do a lookup on the UID to find the object type and then you can do an "instanceof cr.plugins_.Sprite" comparison. If that fails you can throw an exception.