function is_nullable_string()

in src/TypeAssert.hack [18:24]


function is_nullable_string(mixed $value, string $field): ?string {
  if ($value === null) {
    return null;
  }
  invariant($value is string, '%s should be a ?string', $field);
  return $value;
}