Fix #812 - allow to return a struct as a model for a route

Just need to check if return is a value type before testing against null. Thanks