Set the first part of the sql snippet to 0 if it does not exist.

It appears I forgot to set `$sqlObj[0]` to null if it does not exist in my last PR.

This should also fix notices that can show up in some cases.