IDE-1489: NPE Fix

Greg,

Added the fix for NPE check and added the UT for no war source configuration scenario when war plugin is used.

Please review and let me know if its OK
Model this test code like the other tests.