Fix incorrect use of None in pattern