Some may believe that the character Nial, illegally brought a gun on the plane.
However, while it is illegal to bring a gun on a plane through carry-on, the Transport Security Administration(TSA)allows firearms to be checked in a locked hard container. Firearms must also be unloaded.
Since Nial's gun was checked and unloaded, there is no goof.