Do not return $src unmodified when value is NULL

If, for some reason, the src attribute of an image has a NULL value, it is returned directly.
This results in method calls on a NULL-object, triggering a fatal error. This fix checks not only
if $src is a string, but also if it is NULL, and passes the NULL value to Image::createSource() to
allow for better error handling.