add boolean & perform type checking before logic checks