Fix #276 by allowing nil values for setText