Test both of the condition if given