Added the cases to handle the exception of True and False, who were behaving as logic function.