fixes a 'null is not an object in appframework.js' exception
Merge pull request #331 from dpesch/fix2.0/removeNullObjectFix

fixes a 'null is not an object in appframework.js' exception