TypeError thrown

strtolower() expects parameter 1 to be string, null given