Fix for TextArea's cannot call insertBefore method of null exception