Added check for getAttribute