Try:
if (getcomp != null && getcomp.Tables.Count > 0)
{
...
}
But as Richard says: Do not concatenate strings to build a SQL command. It leaves you wide open to accidental or deliberate SQL Injection attack which can destroy your entire database. Use Parametrized queries instead.
Google for "Bobby Tables" and don't just assume it's a joke!