filter out nulls for array_flip

Array flip throws a warning if a value is not a string or an integer. I was uploading a pdf where the height and width values were null causing this warning.