Don't do any query if id is not present.
Authored by: jplang 2013-01-03
Parent: [r11104]
Child: [r11106]