angshu | minor modification to appframework, checking against undefined