added support for casting unops to another type, when needed