Added conditions to avoid PHP fatal error while displaying image meta.