dropdimnames function

Drop dimnames if all elements are NULL