tryMap checks for nil return and error set byref