Adding check for id presence - what rui-castro had done in the first
place