Handle 0 in foreign key different from None