FDP: some code cleanup.
IoC: some code cleanup + added check for bean type nullness before
committing it's definition.