Fix problem with generic types
Test case for generic types (e.g. Option[_])