Changed the order of this logic so it doesn't die when image is None
Merge pull request #1 from theonion/fix-none-check

Changed the order of this logic so it doesn't die when image is None