I would have returned here if errors is not empty  so that i don't have to make null checks for these fields later