Caution. You cannot use simple case to test for null because it always uses the equals operator ( = ). That is because the condition null = null is not true5—consequently, a when null clause never applies. If the <common operand> is null , the else clause applies .