added detection of wrong getAttribute getter return value