Fixes `attr` method returning empty string for missing attributes
feature #9578 [DomCrawler] Fixes `attr` method returning empty string for missing attributes (aik099)

This PR was submitted for the 2.3 branch but it was merged into the master branch instead (closes #9578).

Discussion
----------

[DomCrawler] Fixes `attr` method returning empty string for missing attributes

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Bug discovered on Behat/MinkBrowserKitDriver#32.

Commits
-------

51d23fa [DomCrawler] Fixes `attr` method returning empty string for missing attributes
[DomCrawler] fixed a PHPDoc