I encountered an exception when I tried to use the GetValueFromProperty<T> method in the ObjectExtensions class with a string type parameter and a property that is not a string. The exception message was: System.InvalidCastException: 'Object must implement IConvertible.'