Attempt to implement return type check at runtime