resolveProfileUnits could return null, so you ether need to check for null here or declare exception in throws statement, then catch it here and return appropriate Status instance.