Prevent tables from throwing an error if empty

What it says on the tin.