Check If ImageBuffer is allocated before proceeding.
This patch takes care of the left out places where 
newly created ImageBuffer is not validated.

BUG= 248420

Review URL: https://codereview.chromium.org/562543004

git-svn-id: svn://svn.chromium.org/blink/trunk@181936 bbb929c8-8fbe-4397-9dbb-9b2b20218538