Fix Return nil for errors where applicable