TypeError thrown

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