Ulamog's last ability uses the stack like almost any other triggered ability, so it can be "responded to" and countered like any other triggered ability on the stack (compare Ulamog with Darksteel Colossus) (C.R. 117.7, 701.5a). However, Tormod's Crypt's ability doesn't counter any abilities, but when Ulamog's last ability resolves, Ulamog's owner's library is still shuffled even if that player's graveyard is empty (because all cards were removed from that graveyard with Tormod's Crypt, for example) (C.R. 701.20d).
I see, so basically the opponent still has to shuffle, they're just shuffling a empty graveyard?
Yes, your opponent still shuffles their library this way even if their graveyard is empty, assuming your opponent owns Ulamog (C.R. 701.20d). Note also that Ulamog's last ability will still get to resolve even if Ulamog leaves the graveyard in the meantime (C.R. 113.7a).
Ulamog, the Infinite Gyre 3rd trigger, shuffling graveyard into library…