better error guards

What is this used for?