Created inline and macro for buffer checks