C# - gate now works for nullable types

Gate cannot work for non-nullable type - so this is an ok solution.