fix nullPointerException and create an NDEFMessage correctly