Adds null-safe check on setImageUrl.