Added extra checks (https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5801).
Added extra checks (https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5801).

Danack/ImageMagick,Danack/ImageMagick,Danack/ImageMagick,Danack/ImageMagick,Danack/ImageMagick,Danack/ImageMagick