Changed the naming conventions and added a better nil check