Fix xmlhandler to make sure to check both NULL and None case