If statement to check for image