Rename criteria form helper
Add test to deal with nil value from database