add conditional to handle mongoose objects with _id's