add safer checks for ng-show attrs