Bugfix for GetVariableAs<T> when the variable type to retrieve is a string.