Added check for $id. If it is not set then return from function.