Implemented boolean short circuiting for AND