DB/Ruby: few more NULL/Qnil related fixes.
DB/Ruby: few more NULL/Qnil related fixes.

watusi/rhodes,watusi/rhodes,rhomobile/rhodes,rhomobile/rhodes,watusi/rhodes,watusi/rhodes,watusi/rhodes,rhomobile/rhodes,watusi/rhodes,rhomobile/rhodes,rhomobile/rhodes,rhomobile/rhodes,rhomobile/rhodes,watusi/rhodes,rhomobile/rhodes,rhomobile/rhodes,watusi/rhodes,rhomobile/rhodes,watusi/rhodes,watusi/rhodes