Handle nil source argument in path_to_image