fix type checking bug reported by Nate

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>