Enum member isNullType

True if T is of type null

enum isNullType(T...) = is(U == typeof(null));

Example

int a;
int *b = null;
struct C {}
C c;
void f() {}
static assert(isNullType!null);
static assert(isNullType!a == false);
static assert(isNullType!b == false);
static assert(isNullType!c == false);
static assert(isNullType!f == false);