Could you add the same check in the asText method ?