Ensure the method only attempts to retrieve an image url when the query ...

...returns an image result, otherwise return null.