Added a bunch of checks for id attributes