Fixed: debug line removed and added test for empty URL in is_valid_image