Made endpoint return nil or empty array if no record found.