check for attributes before parsing json