Elimination of redundant if else: in isInOut(); addition if
isInOutReg().