Aded return type checking