Check for NULL on kind

Expose as “” when NULL
Switch pattern's check for NULL to ternary operator

(To be consistent with “kind”’s check)