You can use ExecuteScaler method of Command object and compare if result is null. For example:
Private
How do I find out if there is no data in the table?
Change BorderStyle of a Form programmatically in VB.NET