added check to see if instruments is not null
Merge pull request #1448 from snevesbarros/call_method_of_null_fix

fix for issue 1445.