Which EZ version are you using.. EZ 3.3-X have a new image system which can lead to these problems when checking variables.. I remember I had fatal errors due to some [original] references when updating to EZ 3.3-1.
Note that orginial here is an image scale without any width or height in override/image.ini.
Cheers Tore
Note: The let etc. is not neccesary but I just clicked and paste my code, and I know that the new image system is very sensitive, i.e. I have not managed to get is_valid to work without an let.
See here for more: http://www.ez.no/developer/ez_publish_3/forum/setup_design/is_valid_usage_difficult_bug#msg42692