catch possible exceptions instead of handling "null" as return value