Optimize and checks to preloader

Also fixes a bug where giving nil records to preloader and loading
belongs_to association would error.