Avoid TypeError on conditions