add explicit checks for empty id in controller delete methods