fix($observe): check if the attribute is undefined

Check if the attribute is undefined before manually applying the function because if not an undefined
property is added to the scope of the form controller when the input control does not have a name.

Closes #9707

[#ngEurope](http://ngeurope.org/) /cc @rodyhaddad @vojtajina 
What if the name attribute is set, but empty? Does the condition apply?