check for empty in matching