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.
Merge pull request #164 from styks1987/master

filter out nulls for array_flip