checking .empty || .nil instead of .blank which is a rails only method