return type checking fun types