dayClick and select functions are fixed

for issue #138
Assert only work when activated at runtime, so checking null is perfect for me.