Add null pointer check to FunctionProperty::value.

Also updates the unit test to test for this behaviour. Refs #7004
Merge remote-tracking branch 'origin/bugfix/7004_function_property_crash'