Suggested change:

`if (declaedReturnType == typeof(void) { return new NoContentResult());`