guard against nil value
guard against nil values
use rails 4.0.2