Why a nested if condition? Just use boolean operators