Added checking for none types