Place 'sha' inside 'if pull' block.

This will guarantee that 'sha' will cause no errors:
If a pull is null, than sha will be pulling from null.

Now that it's in the logic block, 'sha' will only be created if a pull
is found.