Added memory check before allocatin native AJ_Message object