Properly check/get by id or name