More elegant checking.