Fixed Crash when executing FileDialogs

Code was trying to parse Strings even if they did not exist, which caused the engine to crash.