Hmm. Very strange. In [official documentation](https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/element/:id/attribute/:name) it's written:
"Returns the value of the attribute, or null if it is not set on the element."
And if we want to get a not exists attribute "class" or "id", we'll get an empty string, but not null. Otherwise, if we try to get not exists attribute "value" or something else, we'll get null, as expected.