Fix issue with none type.