[FX] Generalize dict key check in `create-arg` (#51927)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/51927
Test Plan: Imported from OSS
Reviewed By: pbelevich
Differential Revision: D26329655
Pulled By: jamesr66a
fbshipit-source-id: a15e7d9564551521af12a8fde1c7524856f0cbc2