Reimplementing hasValue in Swift Beta 6.