replace type determination with method GetType() for interfaces