Added a check to make sure that image url is not nil