fix FSDP version related issues
# What does this PR do?
1. This checks if the arg is available before using it to be backward compatible.
2. Fixes #22446 
_The documentation is not available anymore as the PR was closed or merged._<|||||>Thanks fix!