Fix null reference

addresses #1291 on github
Merge pull request #1399 from steventlamb/bug/fix_isplot_null_error

Fix null reference