safer dimof(X) that will fail to compile if X is a pointer