refactored if to reduce nesting
refactored if to reduce nesting

rangp/RequireJSDotNet,rangp/RequireJSDotNet,vtfuture/RequireJSDotNet,davidsk/RequireJSDotNet,davidsk/RequireJSDotNet,vtfuture/RequireJSDotNet,rangp/RequireJSDotNet,davidsk/RequireJSDotNet,vtfuture/RequireJSDotNet