Do some basic validation