fix an npe in analysis
fix tests
Merge pull request #2393 from devoncarew/devoncarew_analysis_npe_fix

fix an npe in analysis