Check for default value before using it

Prevents a crash when return values come back with default not set.
Merge pull request #1 from Floppy/develop

Check for default value before using it