Energy conditions in arbitrary dimensions