Use "!shape" instead of shape === null.

Most of the time, shape will be undefined, not null.