remove setAs[T] and null judge