Null check added for source type parameter.