Optimize "and" and "or" functions in case of empty arguments