rescue typecasting exception in ValueNodeFactory