Added functionality for checkForAttribute().