Fixes a database error which occurs when the entity table is filled with the data from staStations. The error occurs when the corporationID row contains null values.