It is important to look at the reasons why something should be wrong before blindly agreeing.
Does the dress code say, "professional only"? Then wear stuff that's professional. PJs aren't professional.
Business casual? Still not acceptable for PJs.
Sweatpants ok? How about short-shorts? Then so are pajamas pants.
Stop the pajama discrimination.